package server.main.pojo;

import java.util.List;

public class ConfigBean {


    /**
     * function : {"name":"","description":"","body":[{"name":"doctor2","description":"查找doctor","iconaddress":"wu","flag":"ss","unction_url":"/cheshi/pages/index.jsp","function_url":"/cheshi/pages/index.jsp"},{"name":"doctor2","description":"查找doctor","iconaddress":"wu","function_url":"/cheshi/pages/index.jsp"}]}
     * process : [{"bussnessname":"name","inputmsg":"inputmsg","outputmsg":"outputmsg","frontpath":"frontpath","classpath":"classpath","method":"method","description":"description"},{"bussnessname":"name","inputmsg":"inputmsg","outputmsg":"outputmsg","frontpath":"","classpath":"","method":"","description":"description"}]
     * table : [{"tablename":"doctor2","table_type":"2","key":[{"name":"id","if_mainkey":"1","data_type":"int","length":"10","if_increase":"1","if_null":"0"},{"name":"name","if_mainkey":"0","data_type":"varchar","length":"100","if_increase":"0","if_null":"1"},{"name":"idcode","if_mainkey":"0","data_type":"varchar","length":"100","if_increase":"0","if_null":"1"}]}]
     * dependencies : [{"groupId":"SearchDoctor","artifactId":"test.conf.web.doctor2servlet","version":"searchDoctor"}]
     */
    private Config config;
    private FunctionBean function;
    private List<ProcessBean> process;
    private List<TableBean> table;
    private List<DependenciesBean> dependencies;

    @Override
    public String toString() {
        return "ConfigBean{" +
                "config=" + config +
                ", function=" + function +
                ", process=" + process +
                ", table=" + table +
                ", dependencies=" + dependencies +
                '}';
    }

    public Config getConfig() {
        return config;
    }

    public void setConfig(Config config) {
        this.config = config;
    }

    public FunctionBean getFunction() {
        return function;
    }

    public void setFunction(FunctionBean function) {
        this.function = function;
    }

    public List<ProcessBean> getProcess() {
        return process;
    }

    public void setProcess(List<ProcessBean> process) {
        this.process = process;
    }

    public List<TableBean> getTable() {
        return table;
    }

    public void setTable(List<TableBean> table) {
        this.table = table;
    }

    public List<DependenciesBean> getDependencies() {
        return dependencies;
    }

    public void setDependencies(List<DependenciesBean> dependencies) {
        this.dependencies = dependencies;
    }


    public static class Config {
        private String version;

        public String getVersion() {
            return version;
        }

        public void setVersion(String version) {
            this.version = version;
        }

        @Override
        public String toString() {
            return "Config{" +
                    "version='" + version + '\'' +
                    '}';
        }
    }

    public static class FunctionBean {
        /**
         * name :
         * description :
         * body : [{"name":"doctor2","description":"查找doctor","iconaddress":"wu","flag":"ss","unction_url":"/cheshi/pages/index.jsp"},{"name":"doctor2","description":"查找doctor","iconaddress":"wu","function_url":"/cheshi/pages/index.jsp"}]
         */

        private String name;
        private String description;
        private List<BodyBean> body;

        @Override
        public String toString() {
            return "FunctionBean{" +
                    "name='" + name + '\'' +
                    ", description='" + description + '\'' +
                    ", body=" + body +
                    '}';
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public List<BodyBean> getBody() {
            return body;
        }

        public void setBody(List<BodyBean> body) {
            this.body = body;
        }

        public static class BodyBean {
            /**
             * name : doctor2
             * description : 查找doctor
             * iconaddress : wu
             * flag : ss
             * unction_url : /cheshi/pages/index.jsp
             * function_url : /cheshi/pages/index.jsp
             */

            private String name;
            private String description;
            private String iconaddress;
            private String flag;
            private String unction_url;
            private String function_url;

            @Override
            public String toString() {
                return "BodyBean{" +
                        "name='" + name + '\'' +
                        ", description='" + description + '\'' +
                        ", iconaddress='" + iconaddress + '\'' +
                        ", flag='" + flag + '\'' +
                        ", unction_url='" + unction_url + '\'' +
                        ", function_url='" + function_url + '\'' +
                        '}';
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getDescription() {
                return description;
            }

            public void setDescription(String description) {
                this.description = description;
            }

            public String getIconaddress() {
                return iconaddress;
            }

            public void setIconaddress(String iconaddress) {
                this.iconaddress = iconaddress;
            }

            public String getFlag() {
                return flag;
            }

            public void setFlag(String flag) {
                this.flag = flag;
            }

            public String getUnction_url() {
                return unction_url;
            }

            public void setUnction_url(String unction_url) {
                this.unction_url = unction_url;
            }

            public String getFunction_url() {
                return function_url;
            }

            public void setFunction_url(String function_url) {
                this.function_url = function_url;
            }
        }
    }

    public static class ProcessBean {
        /**
         * bussnessname : name
         * inputmsg : inputmsg
         * outputmsg : outputmsg
         * frontpath : frontpath
         * classpath : classpath
         * method : method
         * description : description
         */

        private String bussnessname;
        private String inputmsg;
        private String outputmsg;
        private String frontpath;
        private String classpath;
        private String method;
        private String description;

        @Override
        public String toString() {
            return "ProcessBean{" +
                    "bussnessname='" + bussnessname + '\'' +
                    ", inputmsg='" + inputmsg + '\'' +
                    ", outputmsg='" + outputmsg + '\'' +
                    ", frontpath='" + frontpath + '\'' +
                    ", classpath='" + classpath + '\'' +
                    ", method='" + method + '\'' +
                    ", description='" + description + '\'' +
                    '}';
        }

        public String getBussnessname() {
            return bussnessname;
        }

        public void setBussnessname(String bussnessname) {
            this.bussnessname = bussnessname;
        }

        public String getInputmsg() {
            return inputmsg;
        }

        public void setInputmsg(String inputmsg) {
            this.inputmsg = inputmsg;
        }

        public String getOutputmsg() {
            return outputmsg;
        }

        public void setOutputmsg(String outputmsg) {
            this.outputmsg = outputmsg;
        }

        public String getFrontpath() {
            return frontpath;
        }

        public void setFrontpath(String frontpath) {
            this.frontpath = frontpath;
        }

        public String getClasspath() {
            return classpath;
        }

        public void setClasspath(String classpath) {
            this.classpath = classpath;
        }

        public String getMethod() {
            return method;
        }

        public void setMethod(String method) {
            this.method = method;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }
    }

    public static class TableBean {
        /**
         * tablename : doctor2
         * table_type : 2
         * key : [{"name":"id","if_mainkey":"1","data_type":"int","length":"10","if_increase":"1","if_null":"0"},{"name":"name","if_mainkey":"0","data_type":"varchar","length":"100","if_increase":"0","if_null":"1"},{"name":"idcode","if_mainkey":"0","data_type":"varchar","length":"100","if_increase":"0","if_null":"1"}]
         */

        private String tablename;
        private String table_type;
        private List<KeyBean> key;

        @Override
        public String toString() {
            return "TableBean{" +
                    "tablename='" + tablename + '\'' +
                    ", table_type='" + table_type + '\'' +
                    ", key=" + key +
                    '}';
        }

        public String getTablename() {
            return tablename;
        }

        public void setTablename(String tablename) {
            this.tablename = tablename;
        }

        public String getTable_type() {
            return table_type;
        }

        public void setTable_type(String table_type) {
            this.table_type = table_type;
        }

        public List<KeyBean> getKey() {
            return key;
        }

        public void setKey(List<KeyBean> key) {
            this.key = key;
        }

        public static class KeyBean {
            /**
             * name : id
             * if_mainkey : 1
             * data_type : int
             * length : 10
             * if_increase : 1
             * if_null : 0
             */

            private String name;
            private String if_mainkey;
            private String data_type;
            private String length;
            private String if_increase;
            private String if_null;

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getIf_mainkey() {
                return if_mainkey;
            }

            public void setIf_mainkey(String if_mainkey) {
                this.if_mainkey = if_mainkey;
            }

            public String getData_type() {
                return data_type;
            }

            public void setData_type(String data_type) {
                this.data_type = data_type;
            }

            public String getLength() {
                return length;
            }

            public void setLength(String length) {
                this.length = length;
            }

            public String getIf_increase() {
                return if_increase;
            }

            public void setIf_increase(String if_increase) {
                this.if_increase = if_increase;
            }

            public String getIf_null() {
                return if_null;
            }

            public void setIf_null(String if_null) {
                this.if_null = if_null;
            }
        }
    }

    public static class DependenciesBean {
        @Override
        public String toString() {
            return "DependenciesBean{" +
                    "groupId='" + groupId + '\'' +
                    ", artifactId='" + artifactId + '\'' +
                    ", version='" + version + '\'' +
                    '}';
        }

        /**
         * groupId : SearchDoctor
         * artifactId : test.conf.web.doctor2servlet
         * version : searchDoctor
         */

        private String groupId;
        private String artifactId;
        private String version;

        public String getGroupId() {
            return groupId;
        }

        public void setGroupId(String groupId) {
            this.groupId = groupId;
        }

        public String getArtifactId() {
            return artifactId;
        }

        public void setArtifactId(String artifactId) {
            this.artifactId = artifactId;
        }

        public String getVersion() {
            return version;
        }

        public void setVersion(String version) {
            this.version = version;
        }
    }
}

